import 'package:flustars/flustars.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:h_flutter_119/page/getx/test/interceptor/LoginInterceptChain.dart';

class LoginPage extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('loginPage'),
      ),
      body: Container(
        width: double.infinity,
        height: double.infinity,
        child: Center(
          child: ElevatedButton(onPressed: () {
            getToken();
          },child: Text('模拟求情数据，获取token')),
        ),
      ),
    );
  }

  void getToken() {
    SpUtil.putString('token', '123456');
    LoginInterceptChain().loginFinished();
  }

}